/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package personal.recommender.objects;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Id;

/**
 *
 * @author Aya
 */
@javax.persistence.Entity
public class Entity implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @Id
    @Column(name="id")
    int id;
    @Column(name="name")
    String name;
    @Column(name="freebase_id")
    String freebaseId;
    @Column(name="description")
    String description;
    @Column(name="scoring")
    double scoring;
    @Id
    @Column(name="is_class")
    boolean isClass;

    public int getId() {
        return id;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFreebaseId() {
        return freebaseId;
    }

    public void setFreebaseId(String freebase_id) {
        this.freebaseId = freebase_id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public double getScoring() {
        return scoring;
    }

    public void setScoring(double scoring) {
        this.scoring = scoring;
    }

    public boolean isClass() {
        return isClass;
    }

    public void setClass(boolean is_class) {
        this.isClass = is_class;
    }
    
    public String getIdentifier(){
        return (isClass?"Class":"Instance")+id;
    }
    
}
